<template>
<div>
  <div v-html="content" @click="getImg"></div>
  <t-image-viewer v-model="imageViewerVisible"  :z-index="10000" :images="imageViewerImages" >
  </t-image-viewer>
</div>
</template>

<script>
export default {
  name: "index",
  props:{
    content: {
      type: String,
      default: '',
    }
  },
  data(){
    return {
      imageViewerVisible: false,
      imageViewerImages: [],
    }
  },
  methods:{
    getImg($event){
      if($event.target && $event.target.nodeName === 'IMG'){
        this.imageViewerImages = [$event.target.src]
        this.imageViewerVisible = true;
      }
    },

  }
}
</script>

<style scoped>

</style>
